﻿<%@ Page Title="Thông tin bảo hành" Language="C#" MasterPageFile="~/App_MasterPages/Aquarius.Master"
    AutoEventWireup="true" CodeBehind="LookupWarranty.aspx.cs" Inherits="PanasonicWarranty.UI.LookupWarranty"  %>

<%@ Register Src="../UserControl/ucPaging.ascx" TagName="ucPaging" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CssContent" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            DatePicker("txtSearchFromDate,txtSearchToDate");
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row-fluid">
        <div class="span12">
            <div class="head">
                <div class="isw-grid">
                </div>
                <h1>Điều kiện tìm kiếm</h1>
                <div class="clear"></div>
            </div>
            <div class="block-fluid" style="padding: 10px 0px 5px 10px">
                <table width="100%" cellspacing="0" cellpadding="0" class="">
                    <tbody>
                        <tr>
                            <td>Số điện thoại</td>
                            <td><asp:TextBox ID="txtSearchPhone" runat="server" onkeypress="return ValidateKeypress(/\d+/,event);" /></td>
                            <td>Số máy</td>
                            <td><asp:TextBox ID="txtSearchProductCode" runat="server" /></td>
                            <td>Model sản phẩm</td>
                            <td><asp:TextBox ID="txtSearchModel" runat="server" /></td>
                        </tr>
                    </tbody>
                </table>
                <div style="text-align: center">
                    <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click"
                        CssClass="btn" />
                </div>
                <div style="text-align: center; color: Red">
                    <asp:Literal ID="ltrCheckSearch" runat="server"/>
                </div>
            </div>
        </div>
    </div>
    <div class="row-fluid">
    <div class="span12">
        <div class="head">
            <div class="isw-grid"></div>
            <h1>Danh sách bảo hành</h1>
            <div class="clear"></div>
        </div>
        <div class="block-fluid table-sorting">
            <div class="dataTables_wrapper" id="tSortable_wrapper">
                <div class="dataTables_length">
                    <label>
                        Hiển thị
                        <asp:DropDownList ID="tSortable_length" size="1" aria-controls="tSortable" runat="server"
                            OnSelectedIndexChanged="tSortable_length_SelectedIndexChanged" AutoPostBack="true">
                            <asp:ListItem Value="5" />
                            <asp:ListItem Value="10" />
                            <asp:ListItem Value="25" />
                            <asp:ListItem Value="50" Selected="True" />
                            <asp:ListItem Value="100" />
                            <asp:ListItem Value="200" />
                            <asp:ListItem Value="250" />
                            <asp:ListItem Value="300" />
                        </asp:DropDownList>
                        dòng</label>
                </div>
                <div>
                    <uc1:ucPaging ID="pagingtop" runat="server" Visible="false" />
                </div>
                <asp:GridView ID="grvData" CssClass="table2 dataTable" runat="server" 
                    AutoGenerateColumns="false" Width="100%" ShowHeaderWhenEmpty="true">
                    <Columns>
                        <asp:TemplateField HeaderText="STT" ItemStyle-CssClass="STT">
                            <ItemTemplate>
                                <%#(Container.DataItemIndex + 1) + (pagingtop.CurrentPage - 1) * pagingtop.PageSize%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Mã đại lý">
                            <ItemTemplate>
                                <%#pa_Agency.GetAgencyName(Eval("AgencyID"))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Điện thoại KH" DataField="CustomerPhone" ItemStyle-CssClass="Phone"/>
                        <asp:BoundField HeaderText="Model" DataField="ModelCode" ItemStyle-CssClass="width1"/>
                        <asp:BoundField HeaderText="Số máy" DataField="ProductCode" ItemStyle-CssClass="width2"/>
                        <asp:BoundField HeaderText="Ngày mua hàng" DataField="RegisterDate" DataFormatString="{0:d}" ItemStyle-CssClass="DateTime" />
                        <asp:BoundField HeaderText="Ngày ĐK" DataField="CreatedDate" DataFormatString="{0:d}" ItemStyle-CssClass="DateTime" />
                        <asp:BoundField HeaderText="Ngày duyệt" DataField="ConfirmDate" DataFormatString="{0:d}" ItemStyle-CssClass="DateTime" />
                        <asp:BoundField HeaderText="Thời hạn bảo hành" DataField="Description"  ItemStyle-Width="350px"/>
                    </Columns>
                </asp:GridView>
                <div class="dataTables_info" id="tSortable_info">
                    <asp:Literal ID="ltrInfo" runat="server" />
                </div>
                <div class="dataTables_paginate paging_full_numbers" id="tSortable_paginate">
                    <uc1:ucPaging ID="pagingbottom" runat="server" Visible="false" />
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    </div>
</asp:Content>
